package cn.dao;

import java.io.Reader;

import com.ibatis.common.resources.Resources;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.ibatis.sqlmap.client.SqlMapClientBuilder;

public class SqlClient {
	private static SqlMapClient sqlMapClient = null;
	static{
		try{
			Reader reader = Resources.getResourceAsReader("cn/mybtis/SqlMapConfig.xml");
			sqlMapClient = SqlMapClientBuilder.buildSqlMapClient(reader);
			reader.close();
		}catch(Exception e){
			e.printStackTrace();
		}
	}
	
	public static SqlMapClient getSqlMap(){
		return sqlMapClient;
	}
}
